package com.chenfan.process.enums;

import lombok.Getter;

@Getter
public enum TransferTypeEnum {


    TEMPLATE_AND_DATA(0, "流程及在途数据转移"),

    TEMPLATE(1, "流程"),

    DATA(2, "在途数据"),
                            ;

    private Integer code;
    private String message;

    TransferTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String ofTransferType(Integer transferType) {
        for(TransferTypeEnum transferTypeEnum: values()) {
            if (transferTypeEnum.getCode().equals(transferType)) {
                return transferTypeEnum.getMessage();
            }
        }
        return "";
    }
}
